package p270jp.pxv.android.viewholder;

import android.view.View;
import android.view.ViewGroup;
import androidx.recyclerview.widget.RecyclerView;
import p165fo.C3114c;
import p216hn.DefaultConstructorMarker;
import p270jp.pxv.android.R;
import p270jp.pxv.android.event.SelectGiftSummaryEvent;
import p270jp.pxv.android.model.pixiv_sketch.GiftSummary;
import p314lg.ViewHolderGiftSummaryItemBinding;
import p325m0.MutabilityOwnership;
import p652yj.C7346b;

/* compiled from: LiveGiftSummaryViewHolder.kt */
/* renamed from: jp.pxv.android.viewholder.LiveGiftSummaryViewHolder */
/* loaded from: classes2.dex */
public final class LiveGiftSummaryViewHolder extends RecyclerView.AbstractC0819y {
    private final ViewHolderGiftSummaryItemBinding binding;
    public static final Companion Companion = new Companion(null);
    public static final int $stable = 8;

    /* compiled from: LiveGiftSummaryViewHolder.kt */
    /* renamed from: jp.pxv.android.viewholder.LiveGiftSummaryViewHolder$Companion */
    /* loaded from: classes2.dex */
    public static final class Companion {
        private Companion() {
        }

        public /* synthetic */ Companion(DefaultConstructorMarker eVar) {
            this();
        }

        public final LiveGiftSummaryViewHolder createViewHolder(ViewGroup viewGroup) {
            ViewHolderGiftSummaryItemBinding k6Var = (ViewHolderGiftSummaryItemBinding) C7346b.m327a(viewGroup, "parent", R.layout.view_holder_gift_summary_item, viewGroup, false);
            MutabilityOwnership.m3746l(k6Var, "binding");
            return new LiveGiftSummaryViewHolder(k6Var, null);
        }
    }

    private LiveGiftSummaryViewHolder(ViewHolderGiftSummaryItemBinding k6Var) {
        super(k6Var.f2666e);
        this.binding = k6Var;
    }

    public /* synthetic */ LiveGiftSummaryViewHolder(ViewHolderGiftSummaryItemBinding k6Var, DefaultConstructorMarker eVar) {
        this(k6Var);
    }

    /* renamed from: onBindViewHolder$lambda-0 */
    public static final void m12323onBindViewHolder$lambda0(boolean z, GiftSummary giftSummary, View view) {
        MutabilityOwnership.m3745m(giftSummary, "$item");
        if (z) {
            C3114c.m6284b().m6280f(new SelectGiftSummaryEvent(giftSummary.getGiftingItem()));
        }
    }

    public final void onBindViewHolder(GiftSummary giftSummary, boolean z) {
        MutabilityOwnership.m3745m(giftSummary, "item");
        this.binding.mo3785z(giftSummary);
        this.binding.f21838s.setOnClickListener(new View.OnClickListener(z, giftSummary) { // from class: jp.pxv.android.viewholder.h

            /* renamed from: a */
            public final /* synthetic */ boolean f19761a;

            /* renamed from: b */
            public final /* synthetic */ GiftSummary f19762b;

            {
                this.f19761a = r1;
                this.f19762b = r2;
            }

            @Override // android.view.View.OnClickListener
            public final void onClick(View view) {
                LiveGiftSummaryViewHolder.m12323onBindViewHolder$lambda0(this.f19761a, this.f19762b, view);
            }
        });
        this.binding.m11392i();
    }
}
